<%--
  Created by IntelliJ IDEA.
  User: sunhao
  Date: 2014-11-27
  Time: 16:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
    request.setAttribute("contextPath", request.getContextPath());
%>
<html>
<head>
<title>后台用户管理 - 用户列表</title>
</head>
<body>
	<a href="${contextPath }/admin">返回</a>
	
	<a href="${contextPath }/admin/user/add">新增</a>
	<br/><br/>
	
	<h1>用户中心后台管理</h1>
	<table  border="1">
		<tr>
			<td>用户ID</td>
			<td>登录账户</td>
			<td>用户名称</td>
			<td>用户角色</td>
			<td>用户密码</td>
			<td>用户邮箱</td>
			<td>用户余额</td>
			<td>注册时间</td>
			<td width="10%">操作</td>
		</tr>
		<c:forEach items="${users }" var="u">
			<tr>
				<td>${u.userId }</td>
				<td>${u.loginName }</td>
				<td>${u.userName }</td>
				<td>${u.roleName }</td>
				<td>${u.password }</td>
				<td>${u.email }</td>
				<td>${u.account }</td>
				<td>${u.registerTime }</td>
				<td>
				    <a href="${contextPath }/admin/user/update/${u.userId }">编辑</a>
				    &nbsp;&nbsp;
				    <a href="${contextPath }/admin/user/delete/${u.userId }">删除</a>
				</td>
			</tr>
		</c:forEach>
	</table>
</body>
</html>
